Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import com.genexus.Application;
import com.genexus.CommonUtil;
import com.genexus.ICacheService2;
import com.genexus.util.Encryption;
import com.genexus.util.GXService;
import com.genexus.util.GXServices;


import net.spy.memcached.AddrUtil;
import net.spy.memcached.BinaryConnectionFactory;
import net.spy.memcached.ConnectionFactoryBuilder;
Expand Down Expand Up @@ -42,6 +44,7 @@ MemcachedClient InitCache() throws IOException {
}
else
{
password = Encryption.tryDecrypt64(password);
AuthDescriptor ad = new AuthDescriptor(new String[]{"PLAIN"},
new PlainCallbackHandler(username, password));

Expand Down
184 changes: 184 additions & 0 deletions gxcache-redis/client.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
[Client]
MODEL_NUM= 2
GENERATOR_NUM= 12
LOGIN_AS_USERID=0
SMTP_HOST=
NAME_SPACE=com.genexus.sampleapp
NAME_HOST=
CORBA_SERVER_NAME=
DCOM_GUID=
CONN_TIMEOUT=300
HELP_MODE=WINHTML
HELP_BASEURL=
PREFERRED_UI=BEST
MY_CUSTOM_PTY=SAMPLE_VALUE_FOR_ROOTCFG
JFC_LF=NATIVE
CALENDAR=1
CALC=1
WP_RESIZE=1
SHOW_STATUS=1
FIELD_EXIT=Tab
ESCAPE_FUNCTION=Exit_form
KEY_REFRESH=5
KEY_PROMPT=4
MDI_FORMS=1
REMOTE_CALLS=NEVER
IMAGE_SUBST=0
CS_CONNECT=First
CS_REORG=1
CS_REORGJAVA=1
SUBFILE_ORDER=Y
FC_READONLY=GRAYED
PACKAGE=com.genexus.sampleapp
DECIMAL_POINT=.
DATE_FMT= DMY
CTOD_DATE_FMT= L
BLANK_EMPTY_DATE=0
TIME_FMT=12
YEAR_LIMIT=40
COMPRESS_HTML=1
DocumentType=HTML5
IE_COMPATIBILITY_VIEW=EmulateIE7
EXPOSE_METADATA= 0
WEB_IMAGE_DIR=/static
HTTP_BACKEND_URL=
WEB_STATIC_DIR=
ORQ_CLIENT_URL=
ORQ_SERVER_DIR=
TMPMEDIA_DIR=PrivateTempStorage
PRINT_LAYOUT_METADATA_DIR=LayoutMetadata
HTTP_PROTOCOL=Unsecure
SAMESITE_COOKIE=Lax
StorageTimeZone= 1
GX_BUILD_NUMBER=17233991
ODBC_CALLS=0
NameSpace1=com.genexus.sampleapp
LANGUAGE=German
LANG_NAME=German
Theme=Carmine
CS_BLOB_PATH=PublicTempStorage
SUBMIT_POOL_SIZE=5
CACHE_TTL_0=-1
CACHE_TTL_1=60
CACHE_TTL_2=600
CACHE_TTL_3=0
CACHE_STORAGE_SIZE=0
CACHING=0
SMART_CACHING=0
CACHE_INVALIDATION_TOKEN=202231018204023
EVENT_BEFORE_COMMIT=
EVENT_AFTER_COMMIT=
EVENT_BEFORE_ROLLBACK=
EVENT_AFTER_ROLLBACK=
EVENT_BEFORE_CONNECT=
EVENT_AFTER_CONNECT=
ENABLE_MANAGEMENT=0
EnableIntegratedSecurity=0
IntegratedSecurityLoginWeb=
IntegratedSecurityNotAuthorizedWeb=
HTTPCLIENT_MAX_SIZE=1000
HTTPCLIENT_MAX_PER_ROUTE=1000
VER_STAMP=20220103.214234
[language|English]
code= eng
time_fmt= 12
decimal_point= .
thousand_sep= ,
date_fmt= MDY
culture= en-US
[language|German]
code= German
time_fmt= 12
decimal_point= .
thousand_sep= ,
date_fmt= DMY
culture= de-DE
[language|TraditionalChinese]
code= cht
time_fmt= 24
decimal_point= .
thousand_sep= ,
date_fmt= YMD
culture= zh-TW
[language|SimplifiedChinese]
code= chs
time_fmt= 24
decimal_point= .
thousand_sep= ,
date_fmt= YMD
culture= zh-CN
[language|Spanish]
code= spa
time_fmt= 24
decimal_point= ,
thousand_sep= .
date_fmt= DMY
culture= es-ES
[language|Japanese]
code= jap
time_fmt= 24
decimal_point= .
thousand_sep= ,
date_fmt= YMD
culture= ja-JP
[language|Portuguese]
code= por
time_fmt= 24
decimal_point= ,
thousand_sep= .
date_fmt= DMY
culture= pt-BR
[language|Italian]
code= ita
time_fmt= 24
decimal_point= ,
thousand_sep= .
date_fmt= DMY
culture= it-IT
[language|Arabic]
code= Arabic
time_fmt= 24
decimal_point= ,
thousand_sep= .
date_fmt= DMY
culture= ar-SA
[com.genexus.sampleapp]
GXDB_LOCATION=
JTA=0
DataSource1=DEFAULT
JDBC_LOG= c:\temp\UTL.log
JDBCLogEnabled=1
JDBCUniqueName=0
JDBCLogPath=
JDBCLogLevel=0
JDBCLogBuffer=0
JDBCLogDetail=0
[com.genexus.sampleapp|DEFAULT]
CS_DBNAME=
INFORMIX_DB=ANSI
CS_LIBL400=
CS_PACKAGE400=
DB2400_DATE_DATATYPE=
CS_SCHEMA=
USER_ID=G8xdg8k/gK9eOCDgU75tkr==
USER_PASSWORD=4gPZ5cDtMVud7diJ/gIVrg==
CS_CONNECT=First
WAIT_RECORD=0
LOCK_RETRY=10
LoginInServer=1
JDBC_DRIVER=org.sqlite.JDBC
DB_URL=jdbc:sqlite:sample.db
USE_JDBC_DATASOURCE=0
JDBC_DATASOURCE=
MAX_CURSOR=100
INITIALIZE_NEW=1
ISOLATION_LEVEL=CR
XBASE_TINT=1
DBMS=sqlite
UnlimitedRWPool=1
PoolRWEnabled=1
RecycleRW=1
RecycleRWType=1
RecycleRWMin=30
POOLSIZE_RW=10
POOL_STARTUP=0
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.genexus.ICacheService2;
import com.genexus.diagnostics.core.ILogger;
import com.genexus.diagnostics.core.LogManager;
import com.genexus.util.Encryption;
import com.genexus.util.GXService;
import com.genexus.util.GXServices;

Expand Down Expand Up @@ -74,7 +75,7 @@ private void initCache(String hostOrRedisURL, String password, String cacheKeyPa
throw e;
}

password = (!isNullOrEmpty(password)) ? password : null;
password = (!isNullOrEmpty(password)) ? Encryption.tryDecrypt64(password) : null;

pool = new JedisPool(new JedisPoolConfig(), host, port, redis.clients.jedis.Protocol.DEFAULT_TIMEOUT, password);

Expand Down
13 changes: 13 additions & 0 deletions gxcache-redis/src/test/java/com/genexus/sampleapp/GXcfg.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.genexus.sampleapp;
import com.genexus.*;

public final class GXcfg
{
public static int strcmp( String Left ,
String Right )
{
return GXutil.rtrim(Left).compareTo(GXutil.rtrim(Right));
}

}

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.genexus.test.cache.redis;

import com.genexus.Application;
import com.genexus.cache.redis.RedisClient;
import com.genexus.db.CacheValue;
import org.apache.logging.log4j.LogManager;
Expand All @@ -24,6 +25,7 @@ public void beforeTest() {

Connect.init();
com.genexus.specific.java.LogManager.initialize(".");
Application.init(com.genexus.sampleapp.GXcfg.class);
}

@Test
Expand Down